The hard disk drive is one of the most popular external storage devices for the computer. A magnetic disk that is the storage medium for the hard disk drive has the minimum storage unit of a sector which is a subdivision of a track on a disk surface like a tree ring, as well known.
The hard disk drive has a magnetic head for reading out the data stored in the magnetic disk or writing the data into the magnetic disk. This magnetic head is mounted on an actuator mechanism that is oscillated by a VCM (Voice Coil Motor).
In reading or writing the data, the magnetic head is moved to a predetermined track and positioned by driving the actuator mechanism. The magnetic head is controlled to be moved to the predetermined position in accordance with the servo information stored on the magnetic disk. The hard disk drive has a high storage density per unit of area and a low S/N ratio in a signal processing system, so that the presence of magnetic defect on the magnetic disk can not be ignored. Therefore, it is important to make the error correction to enhance the reliability of data to be read or written irrespective of the presence of defect on the magnetic disk.
The error correction is made if the read data contains any error. An error occurs due to exfoliation of a magnetic layer formed on the magnetic disk, scratch of the magnetic disk caused by the magnetic head, or contamination on the magnetic disk. For this error correction, the hard disk drive has a parity of several tens bytes added for every sector (usually 512 bytes) of data on the magnetic disk, as shown in FIG. 7. This parity is called an ECC (Error Correcting Code). The ECC is generated from the user data (User Data) of each sector as the information word, without correlation with the user data in other sectors.
In reading the user data, an error location is detected on the basis of the ECC data produced by an ECC circuit provided on the hard disk drive and the read parity (ECC) to perform an error correcting process.
In the hard disk drive at present, if a TA (Thermal Asperity) or scratch occurs, the user data of several tens of bytes to hundreds of bytes may be broken at a time due to increased storage density. Therefore, the ECC is required to have a greater error correction capability, but to enhance the error correction capability of the ECC, the ECC is necessary to have more redundancy. If the redundancy is increased, a greater ECC percentage (overhead of code) is occupied on a disk format. And if the overhead of code is typically more than 15%, the error correction results in zero benefit.
Conventionally, each sector is treated as an independent information word, with the ECC appended to each information word. In this case, if an error occurs beyond the ability of appended ECC, the error correction is uncorrectable. To correct a severe error that occurs rarely, it is necessary to append the larger ECC, resulting in a problem that the overhead of code is increased.
To cope with this problem, it is effective to have a method for multilevel encoding the ECC. For example, in a case of triple encoding, the ECC for each sector is C1, the ECC for four sectors having greater error correction capability than C1 is C2, and the ECC for eight sectors having greater error correction capability than C2 is C3, in which the information word of C2 is exclusive OR of the user data in the consecutive four sectors, and the information word of C3 is exclusive OR of the user data in the consecutive eight sectors. This method is referred to as an ISF in this specification.
Referring to FIGS. 8 and 9, the ISF will be described below.
In FIG. 8, eight sectors from sector 0 to sector 7 on the magnetic disk are shown. As the ECC, C1 is contained in each of the sectors 0 to 7, C2 is contained in sector 3, and C3 is contained in sector 7. As shown in FIG. 9, sector 0 (user data 0), sector 1 (user data 1) and sector 2 (user data 2) are exclusive ORed (XOR) to have the virtual user data, with the correlation in the sectors 0 to 2. And C2 having greater error correction capability than C1 is generated in the virtual user data, whereby even if the error is uncorrectable with C1, the error correction can be made with C2. Since C1 contains C2, only C2-C1 bytes of C2 are actually stored on the magnetic disk. In this way, if an uncorrectable error occurs with C1, the error correction with C2 is enabled by reading four sectors. If the error is uncorrectable with C2, the error correction with C3 is enabled by reading eight sectors. Since C2 and C3 for the ECC having greater error correction capability are stored for a plurality of sectors only once, the error correction with greater ability is enabled without increasing the overhead of code over the conventional one. In the above example, a set of four sectors containing one C2 is defined as a block or C2 block.
In FIG. 8, C2 is stored before C1 in sector 3, and C3 is stored before C2 in sector 7. This format is desirably employed to reduce the number of gates and simplify the processing, because C2 and C3 are the information word of C1, and in a format where C2 and C3 are stored after C1, a write buffer is required in writing the user data, and the processing is very complex.
For example, in a case where C1 has 52 bytes, C2 has 16 bytes and C3 has 40 bytes, the conventional hard disk drive enables the error correction of 66 bytes at maximum to be made at an overhead of 13%, while the ISF enables the error correction of 104 bytes at maximum to be made at an overhead of 10.6%.
In a current situation where the ECC has an almost limited number of bytes to be appended to one sector, the ISF with the possibility of greater error correction capability is a very powerful encoding method.